﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wjtour.Common;
using Hjp.FrameWork.Common;
using Wjtour.BLL;
using System.Linq;

namespace Wjtour.Web.Front
{
    public partial class specialtyproducts : BasePage
    {
        #region 固定分页参数
        protected int page = 1;
        protected int pagesize = 7;
        #endregion

        goods_bll _bll = new goods_bll();
        protected PaginationData<Wjtour.Domain.goods> data = new PaginationData<Domain.goods>();

        protected List<Wjtour.Domain.line> recommendLines = new List<Domain.line>();
        Wjtour.BLL.line_bll _linebll = new line_bll();

        protected List<Wjtour.Domain.article> trafficGuides = new List<Domain.article>();//旅游攻略
        Wjtour.BLL.article_bll _articleBll = new article_bll();

        protected void Page_Load(object sender, EventArgs e)
        {
            page = Utils.StrToInt(Request["page"], 1);
            bindList();
        }
        void bindList()
        {
            data = _bll.GetList(null, page - 1, pagesize);
            PagnationHtml = GetPageHtml("specialtyproducts.aspx", page, data.Pager.TotalPages);

            recommendLines = _linebll.GetAll<Wjtour.Domain.line>("select top 6 * from line where isrecommend=1").ToList();
            trafficGuides = _articleBll.GetAuditTopListWithFirstLogo("6", 7, 2);
        }
    }
}
